/*
Navicat MySQL Data Transfer

Source Server         : mysql55
Source Server Version : 50523
Source Host           : localhost:3306
Source Database       : financialmanage

Target Server Type    : MYSQL
Target Server Version : 50523
File Encoding         : 65001

Date: 2012-09-24 20:44:19
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `emp_product`
-- ----------------------------
DROP TABLE IF EXISTS `emp_product`;
CREATE TABLE `emp_product` (
`id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`userid`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`product_code`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`create_date`  date NULL DEFAULT NULL ,
`num`  int(11) NOT NULL ,
`earning`  double NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=9

;

-- ----------------------------
-- Records of emp_product
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `employee`
-- ----------------------------
DROP TABLE IF EXISTS `employee`;
CREATE TABLE `employee` (
`id`  bigint(20) NOT NULL AUTO_INCREMENT COMMENT '员工编号' ,
`name`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '性别' ,
`tel`  varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系方式' ,
`gender`  varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '男' ,
`department_code`  varchar(6) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门id' ,
`employed_date`  date NULL DEFAULT NULL COMMENT '入职时间' ,
`userid`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`pwd`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '123456' ,
`position`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=44

;

-- ----------------------------
-- Records of employee
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `product`
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`product_code`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`name`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`type`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`piece_rate`  double NOT NULL DEFAULT 0 ,
`comment`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`pic`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`size`  varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`color`  varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=16

;

-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for `salary`
-- ----------------------------
DROP TABLE IF EXISTS `salary`;
CREATE TABLE `salary` (
`id`  bigint(20) NOT NULL AUTO_INCREMENT ,
`earning`  double NOT NULL DEFAULT 0 ,
`expend`  double NOT NULL DEFAULT 0 ,
`balance`  double NULL DEFAULT NULL ,
`date`  datetime NULL DEFAULT NULL ,
`userid`  varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
`username`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
AUTO_INCREMENT=12

;

-- ----------------------------
-- Records of salary
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Auto increment value for `emp_product`
-- ----------------------------
ALTER TABLE `emp_product` AUTO_INCREMENT=9;

-- ----------------------------
-- Auto increment value for `employee`
-- ----------------------------
ALTER TABLE `employee` AUTO_INCREMENT=44;

-- ----------------------------
-- Auto increment value for `product`
-- ----------------------------
ALTER TABLE `product` AUTO_INCREMENT=16;

-- ----------------------------
-- Auto increment value for `salary`
-- ----------------------------
ALTER TABLE `salary` AUTO_INCREMENT=12;
